# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=kdenlive
pkgver=20.04.3
pkgrel=0
arch="all !armhf"
url="https://kdenlive.org"
pkgdesc="An intuitive and powerful multi-track video editor, including most recent video technologies"
license="GPL-2.0-or-later"
depends="frei0r-plugins mlt"
makedepends="extra-cmake-modules qt5-qtbase-dev qt5-qtsvg-dev qt5-qtmultimedia-dev mlt-dev kxmlgui-dev kfilemetadata-dev purpose-dev kdoctools-dev knotifyconfig-dev knewstuff-dev kdeclarative-dev rttr-dev"
checkdepends="xvfb-run"
source="https://download.kde.org/stable/release-service/$pkgver/src/kdenlive-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"
options="!check" # Broken

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	cd build
	CTEST_OUTPUT_ON_FAILURE=TRUE xvfb-run ctest
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="5a1b37440b212bd7a613fe1de16d8c42771f5bd0dedd80a2bccbab84517adb1a34f7649069b6a686f84114967b42c70278df9447107bfff361ca1a93bb366689  kdenlive-20.04.3.tar.xz"
